<h2>Foraging Bee Simulation</h2>
<h4>Copyright 2009 <a href="mailto:hoehne@thinktel.de">J&ouml;rg H&ouml;hne</a></h4>
<p>
This model simulates a hive with foraging bees. Around the hive are several food sources located.
The bees start in the hive doing a random walk. For every step the urge to do some scouting outside
the hive is computed. Being outside scouting bees do a random search for a food source.<br>
If a food source is found the bee get the nectar and returns to its hive. The bee delivers the
nectar (converted to honey) and starts a random walk in the hive again. Bees
having information about a food source can perform a bee dance to inform other bees about the
food source. Every bee in the hive can listen to a nearby dancing bee to retrieve information
about a food source. During the retrieval of the information some noise is added so the listening
(retrieving) bee does not get accurate information about the food source. The noise affects the
direction and distance (each from the hive's entrance) of the food source.
<p>
After retrieving information about a food source the bee leaves the hive and starts foraging.
Arriving at the expected food source location the bee switches into searching mode to find the
food source. If it does not find the food source after a given amount of steps it gives up and
returns to the hive (still having information about the food source).<br>
Every bee having information about a food source can perform a bee dance to inform other bees
about the food source. An information holding bee can also spontaneously forget about the food
source.
<p>
The visualization of the bee are is ruled by the following color scheme:
<ul>
<li><b>yellow</b>: The bee is in the hive, has no information about a food source and may listen
to dancing bees or starts scouting.</li>
<li><b>green</b>: The bee is scouting outside the hive.</li>
<li><b>white</b>: The bee was foraging, did not found the food source, gave up and is now returning to the hive.</li>
<li><b>color of a food source</b>:
<ul>
<li>Inside the hive: The bee is dancing.</li>
<li>Outside the hive, flying a straight line: The bee is foraging having information about a food source.</li>
<li>Outside the hive, random flight: The bee is searching having information about a food source.</li>
<li>Outside the hive, returning to the hive: The bee collected nectar from the source and returns.</li>
</ul>
</li>
</ul>
For the different behaviour the bee cycles through different states representing a state specific behaviour (and color coding). The states are:
<ul>
<li><b>initialState</b>: The bee starts in this state and obtains state <b>inHiveWithoutInfo</b>.</li>
<li><b>inHiveWithoutInfo</b>: The bee is colored yellow, has no information about a food source and
may start scouting (<b>leaveHive</b>, <b>scouting</b>) or listening to a dancing bee
(<b>danceFollowing</b>).</li>
<li><b>inHiveWithInfo</b>: The bee has information about a food source and may start dancing
(<b>dancing</b>), start foraging (<b>leaveHive</b>, <b>foraging</b>) or forgets about the food
source and obtain state <b>inHiveWithoutInfo</b>.</li>
<li><b>leaveHive</b>: The bee starts leaving the hive for <b>scouting</b> or <b>foraging</b>.</li>
<li><b>danceFollowing</b>: The bee listens to a dancing bee and obtains states <b>leaveHive</b> and
<b>foraging</b>.</li>
<li><b>dancing</b>: The bee is dancing and obtains state <b>inHiveWithInfo</b>.</li>
<li><b>foraging</b>: The bee is foraging by heading to the food source. On arrival at the expected food source
it obtains state <b>searching</b>.</li>
<li><b>searching</b>: The bee searches for the expected food source by a random flight for a maximum
number of steps. If it is not successful it obtains <b>returnWithInfo</b>, if successful it obtains state
<b>returnWithInfoAndLoad</b>.</li>
<li><b>returnWithInfo</b>: The bee has information about a food source but did not find it hence have no nectar. It
returns to the hive, obtains state <b>unloadQueue</b>.</li>
<li><b>returnWithInfoAndLoad</b>: The bee has information about a food source and gathered nectar. It return to
the hive, obtains state <b>unloadQueue</b>.</li>
<li><b>unloadQueue</b>: If the bee carries nectar it will be unloaded, the bee obtains state <b>inHiveWithoutInfo</b>
or <b>inHiveWithInfo</b> according to its prior knowledge of a food source.</li>
<li><b>scouting</b>: The bee does a random flight looking for a food source. After a certain time with no success
it returns, obtaining state <b>returnWithoutInfo</b>.</li>
<li><b>returnWithoutInfo</b>: The bee returns without any information to the hive and obtains on arrival the
state <b>inHiveWithoutInfo</b>.</li>
<li><b>dead</b>: The bee dies because it didn't make it in time back to the hive (running out of nectar). After
being marked as dead the bee obtains in the next simulation cycle the state <b>terminated</b>.</li>
<li><b>terminated</b>: The bee will be removed from the simulation.</li>
</ul>
The states are implemented according to the given description in the programs source code.
<p>
This program is a basic demonstration of foraging bees. The model relies on the model from
<a href="http://zool33.uni-graz.at/schmickl/Self-organization/Collective_decisions/Bee_foraging/bee_foraging.html">here</a>.
This model will be extended in the future (currently a basic obstacle avoidance is implemented)
for the demonstration of some programming techniques so stay tuned.<br>
Have fun playing with it, alter the parameters
and feel free to write a nice GUI for this application. If you have any questions or comments feel free
to drop a line at my <a href="mailto:hoehne@thinktel.de">email address</a>.
</body></html>
